import { createStore } from "vuex";
export default createStore({
  state: localStorage.getItem("state")
    ? JSON.parse(localStorage.getItem("state"))
    : {
        userInfo: {},
      },
  getters: {
    getUserInfo: (state) => {
      let userInfo = state.userInfo;
      return userInfo;
    },
  },
  mutations: {
    setUserInfo(state, data) {
      state.userInfo = data;
    },
  },
  actions: {},
  modules: {},
});
